<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<jsp:directive.page import="java.text.SimpleDateFormat"/>
<%@page import="java.net.URLDecoder" %>
<%@ page import="xin.fallen.dao.LocalDataDao" %>
<%
    //解析条件
    String strInput = request.getQueryString();
    System.out.println(strInput);
    String strCon = "";
    String callback = "";
    if (strInput.indexOf("q=") >= 0) {
//        strCon = new String(request.getParameter("q").getBytes("iso-8859-1"), "utf-8");
        try {
            strCon = URLDecoder.decode(strInput, "utf-8");
        } catch (Exception e) {
        }
        callback = request.getParameter("callback");
    }
    System.out.println("这里是条件：" + strCon);

    StringBuffer res = new StringBuffer();
    res.append(callback);
    res.append("(");
    res.append(LocalDataDao.getInstance().toSelect("SCOTT", strCon));
    res.append(")");
    response.setContentType("application/json;charset=utf-8");
    response.getWriter().write(res.toString());
    response.getWriter().flush();
%>